package com.jixin.jdpay;

import java.util.ResourceBundle;

import com.jixin.core.Configuration;


public class JdPayConfig {

	
	private static ResourceBundle jdpay    			= null;
	private volatile static JdPayConfig instance	= null;
	
	private JdPayConfig(String configFile) {
		jdpay = ResourceBundle.getBundle(configFile);
	}
	
	public static JdPayConfig getInstance(String configFile) {
		if(instance == null) {
			synchronized(Configuration.class) {
				if(instance == null) {
					instance = new JdPayConfig(configFile);
				}
			}
		}
		return instance;
	}
	
	public String getValue(String key) {
		return (jdpay.getString(key));
	}
}
